#ifndef AAC_ONE_FRAME_GET_H_
#define AAC_ONE_FRAME_GET_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>






typedef struct {
	unsigned char verify_byte[4];
	int samplerate;
	int channel_num;
	int frame_length;
}aac_adts_info;


typedef struct {
    aac_adts_info adts_info;
    char *buffer;
    int buffer_size;
    long used_len;
    long read_len;
    long cur_frame_index;
    long cur_frame_addr;
    long next_frame_addr;
    int  find_first_frame;
	int  first_find_flag;
    unsigned long num;
    unsigned long find_flag;
    int ts_used_flag;
}aac_get_info;

int aac_one_frame_get_init(aac_get_info *info);
int aac_one_frame_get_process(aac_get_info *info, char *src_buffer,int src_len ,char * dst_buffer, int *buffer_length);
int aac_one_frame_get_exit(aac_get_info *info);

#endif
